﻿<UserControl x:Class="LinearSolver.View.LinearProgramView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:vm="clr-namespace:LinearSolver.ViewModel"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

    <UserControl.DataContext>
        <vm:LinearProgramVM />
    </UserControl.DataContext>
    
    <DockPanel>
        <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Height="40">
            <RadioButton Content="Maximise" GroupName="MaxMin" IsChecked="True" VerticalAlignment="Center" Margin="10"/>
            <RadioButton Content="Minimise" GroupName="MaxMin" VerticalAlignment="Center" Margin="10"/>
        </StackPanel>
        <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Height="40">
            <TextBox Width="160" VerticalAlignment="Center"/>
            <TextBlock Padding="5" VerticalAlignment="Center">E.g. 2x + 3y</TextBlock>
        </StackPanel>
        <TextBlock Height="30" Text="subject to" DockPanel.Dock="Top" />
        <StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
            <TextBox Width="200" AcceptsReturn="True" MinLines="5"/>
            <TextBlock Padding="5">E.g.
                <LineBreak />
                3x + 2y &gt; 6
                <LineBreak />
                3y + 4x &lt; 4
            </TextBlock>
        </StackPanel>
        
        <StackPanel DockPanel.Dock="Top">
            <Button Content="Solve" Padding="5" HorizontalAlignment="Center" />
        </StackPanel>
        <StackPanel DockPanel.Dock="Top">
            <Label Content="Solution:"/>
            <TextBlock Text="{Binding SolutionText}" Margin="10" MinHeight="50" />
        </StackPanel>
    </DockPanel>
</UserControl>
